import 'package:flutter/material.dart';
//页面状态异常管理器
abstract class HiState<T extends StatefulWidget> extends State<T>{

  @override
  void setState(VoidCallback fn) {
    //判断页面是否被销毁了
    if(mounted){
      super.setState(fn);
    }else{
      print("HiState:页面销毁,本次setState不执行${toString()}");
    }
  }
}